1. Field of the Invention
The present invention relates to a three-dimensional graphic processing apparatus for performing shading of a graphic pattern constituted by a plurality of polygons.
2. Description of the Related Art
In the field of three-dimensional graphic processing, Gouraud shading is well known as an algorithm for performing three-dimensional display by . The three-dimensional shading display obtained by the Gouraud shading will be described below. First, information about a polygon is given. The contents of the information are three-dimensional coordinate values and a intensity value of each vertex of the polygon. For example, if the polygon is a triangle as shown in FIG. 1, information (x,y,z,I) containing three-dimensional coordinate values and a intensity value about a vertex A is (x1,y1,z1,I1), that about a vertex B is (x2,y2,z2,I2), and that about a vertex C is (x3,y3,z3,I3).
Referring to FIG. 1, assuming that reference numeral 40 denotes a scan line parallel to the X coordinate axis, in order to perform shading, intensity values, X and Y coordinate values, and Z coordinate values representing the depths must be calculated for pixels along the scan line 40. An intensity value I and the Z coordinate value can be calculated by interpolation calculations. For example, an intensity value I4 of a pixel D at a three-dimensional coordinate point (x4,y4,z4) as an intersection point of the line 40 and a side BC of the triangle polygon can be obtained by an interpolation calculation of vertexes B and C, and a intensity value I5 of a pixel E at a three-dimensional coordinate point (x5,y5,z5) as an intersection point of the line 40 and a side AC can be obtained by an interpolation calculation of vertexes A and C. That is, the intensity values 14 and 15 are given by: ##EQU1##
An intensity value at an arbitrary pixel F on the line 40 can be obtained by an interpolation calculation of the intensity values I4 and I5.
Also, Z coordinate values z4 and z5 representing the depths of the pixels D and E and a Z coordinate value at the arbitrary pixel F on the line 40 can be obtained by similar interpolation calculations. That is, the Z coordinate values z4 and z5 are given by: ##EQU2##
In this case, at pixels on one scan line parallel to the X coordinate axis, inclinations of Z coordinate values and those of intensity values with respect to X coordinate values are constant, respectively.
In a conventional apparatus for performing the three-dimensional shading display, Z coordinate values and intensity values of pixels on each scan line are sequentially calculated by a single arithmetic IC for each pixel. Calculation results are than written in a display memory to perform painting of a graphic pattern.
The access speed of memory, however, is lower than the calculation speed of the arithmetic IC, and the throughput of the entire apparatus is therefore determined by the access speed. Since the number of pixels constituting a three-dimensional graphic pattern is very large, shading requires a very long time in the conventional apparatus because of the low access speed.